﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RooHui.Infrastructure.Entities.Enum
{
    public static class EnumMapping
    {
        public static string Mapping(this ProjectStatus projectStatus)
        {
            switch (projectStatus)
            {
                default:
                case ProjectStatus.NotPass:
                    return "审核未通过";
                case ProjectStatus.Save:
                    return "已保存";
                case ProjectStatus.Submit:
                    return "已提交";
                case ProjectStatus.Auditing:
                    return "审核中";
                case ProjectStatus.Pass:
                    return "审核通过";
                case ProjectStatus.Publish:
                    return "招标中";
                case ProjectStatus.Failure:
                    return "流标";
                case ProjectStatus.Full:
                    return "已满标";
                case ProjectStatus.Success:
                    return "融资成功";
                case ProjectStatus.Repayment:
                    return "还款中";
                case ProjectStatus.Complete:
                    return "已结束";
            }
        }
        public static string Mapping(this BalanceType balenceType)
        {
            switch (balenceType)
            {
                default:
                case BalanceType.AverCapitalInterest:
                    return "每期等额本息";
                case BalanceType.EachInterestTerminalCapital:
                    return "每期结息，到期还本";
                case BalanceType.EverageFixed:
                    return "每期等额结算";
                case BalanceType.TerminalCapitalInterest:
                    return "到期结本付息";
                case BalanceType.TerminalFixed:
                    return "到期结算";
            }
        }
        public static string Description(this BalanceType balanceType)
        {
            switch (balanceType)
            {
                default:
                case BalanceType.AverCapitalInterest:
                    return "每个结算周期，以“总额本金+总额利息/期数”的方式平均结算";
                case BalanceType.EachInterestTerminalCapital:
                    return "每个结算周期结算“总额利息/期数”，最后一期结算全部本金";
                case BalanceType.EverageFixed:
                    return "每个结算周期结算“总额/期数”";
                case BalanceType.TerminalCapitalInterest:
                    return "投资到期后结算全部本金+利息";
                case BalanceType.TerminalFixed:
                    return "投资到期后结算";
            }
        }
        public static string Mapping(this DurationType durationType)
        {
            switch (durationType)
            { 
                case DurationType.ByDay:
                    return "日";
                default:
                case DurationType.ByMonth:
                    return "月";
            }
        }
        public static string Mapping(this MemberType memberType)
        {
            switch (memberType)
            {
                default:
                case MemberType.Invester:
                    return "投资人";
                case MemberType.Borrower:
                    return "借款人";
                case MemberType.Agent:
                    return "经纪人";
            }
        }

        public static string Mapping(this SettlementType settlementType)
        {
            switch (settlementType)
            {
               
                case SettlementType.Fixed:
                    return "固定值";
                case SettlementType.Proportion:
                    return "百分比";
                default:
                    return "未知";
            }
        }

        public static string Mapping(this Gender gender)
        {
            switch (gender)
            {

                case Gender.Male:
                    return "男";
                case Gender.Female:
                    return "女";
                default:
                case Gender.Unknow:
                    return "未知";
            }
        }
        public static string Mapping(this ResourceSubType resourceSubType)
        {
            switch (resourceSubType)
            {
                default:
                case ResourceSubType.ProjectAgreement:
                    return "项目担保资料";
                case ResourceSubType.ProjectDesction:
                    return "项目抵押资料";
                case ResourceSubType.ProductSummary:
                    return "产品介绍资料";
            }
        }
        public static string Mapping(this AmountOperationType amountOperationType)
        {
            switch (amountOperationType)
            { 
                default:
                    return "";
                case AmountOperationType.Investment:
                    return "项目投标放款";
                case AmountOperationType.Recharge:
                    return "帐户充值";
                case AmountOperationType.Settlement:
                    return "投资结算";
                case AmountOperationType.Withdraw:
                    return "提现";
                case AmountOperationType.FreezeForProject:
                    return "投标资金冻结";
                case AmountOperationType.UnFreezeForProject:
                    return "投标资金解冻";
            }
        }
    }
}
